package service;

import java.util.List;

import Dao.WordDao;
import Dao.WordDaoimpl;
import entity.Record;
import entity.Word;

public interface WordService{
	
	
	/**
	* Title: getbyword
	* Description: 单词名查询单词列表
	* @author 张文涛
	*/
	public List<Word> getbyword(String word) throws Exception ;
	
	/**
	 * Title: getNoOrderNomemaryword
	 * Description: 乱序选取未背单词
	 * @author 张文涛
	 * @return
	 * @throws Exception
	 */
	public List<Word> getNoOrderNomemaryword(String email) throws Exception;
	
	/**
	 * Title: getOrderNomemaryword
	 * Description: 顺序选取未背单词
	 * @author 张文涛
	 * @return
	 * @throws Exception
	 */
	public List<Word> getOrderNomemaryword(String email) throws Exception;
	
	/**
	 * Title: getNoOrdermemaryword
	 * Description: 乱序选取已背单词
	 * @author 张文涛
	 * @return
	 * @throws Exception
	 */
	public List<Word> getNoOrdermemaryword(String email) throws Exception;
	
	/**
	 * Title: getOrdermemaryword
	 * Description: 顺序选取已背单词
	 * @author 张文涛
	 * @return
	 * @throws Exception
	 */
	public List<Word> getOrdermemaryword(String email) throws Exception;
	
	/**
	* Title: searchByname
	* Description: 通过英文搜索单词
	* @author 张文涛
	*/
	public List<Word> searchByname(String word,Integer limit) throws Exception ;
	
	/**
	 * Title: getWords
	 * Description: 从 Book 中 的 begin 开始 获取 limit 条数的 单词列表
	 * @author 张文涛
	 * @throws Exception 
	 */
	public List<Word> getWords(String book,String email,Integer page) throws Exception;
	
	/**
	 * Title: searchByChinese
	 * Description: 通过单词中文匹配所有单词
	 * @author 张文涛
	 */
	public List<Word> searchByChinese(String chinese,Integer limit) throws Exception;
	
	/**
	 * Title: getBooks
	 * Description: 获取图书列表
	 * @author 张文涛
	 * @throws Exception 
	 */
	public List<String> getBooks() throws Exception;
	
	/**
	 * Title: searchByname
	 * Description: 在某本书中通过单词名搜索该单词
	 * @author 张文涛
	 */
	public List<Word> searchByname(String book,String word,Integer limit) throws Exception;
	
	/**
	 * Title: searchByChinese
	 * Description: 在某本书中通过中文搜索该单词
	 * @author 张文涛
	 */
	public List<Word> searchByChinese(String book,String chinese,Integer limit) throws Exception;
	
	/**
	 * Title: insertword
	 * Description: 添加单词
	 * @author 张文涛
	 * @param w
	 * @throws Exception
	 */
	public void addword(String book,Word w) throws Exception;
	
	/**
	 * Title: getmyword
	 * Description: 获取今天所背单词
	 * @author 张文涛
	 * @return
	 */
	public List<Word> getmyword(String email) throws Exception;
	
	/**
	 * Title: recordtowords
	 * Description: 将记录转换成单词
	 * @author 张文涛
	 */
	public List<Word> recordtowords(List<Record> rds) throws Exception;
	
	/**
	 * Title: addword
	 * Description: 添加单词
	 * @author 张文涛
	 * @throws Exception
	 */
	public void addword(Word word,String book) throws Exception;
}
